<?php

use Illuminate\Database\Seeder;

class PermissionsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$permissions = [
    		[
    			'code' => 'company',
    			'parent_code' => 'top',
    			'name' => '企业管理',
    			'permissiontable_code' => 'company',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'attendance',
    			'parent_code' => 'top',
    			'name' => '考勤管理',
    			'permissiontable_code' => 'attendance',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'security',
    			'parent_code' => 'top',
    			'name' => '安保管理',
    			'permissiontable_code' => 'security',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'conference',
    			'parent_code' => 'top',
    			'name' => '会议管理',
    			'permissiontable_code' => 'conference',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'training',
    			'parent_code' => 'top',
    			'name' => '培训管理',
    			'permissiontable_code' => 'training',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'culture',
    			'parent_code' => 'top',
    			'name' => '内容管理',
    			'permissiontable_code' => 'culture',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'finance',
    			'parent_code' => 'top',
    			'name' => '财务管理',
    			'permissiontable_code' => 'finance',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'wages',
    			'parent_code' => 'top',
    			'name' => '薪资管理',
    			'permissiontable_code' => 'wages',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'system',
    			'parent_code' => 'top',
    			'name' => '系统设置',
    			'permissiontable_code' => 'system',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'logs',
    			'parent_code' => 'top',
    			'name' => '操作日志',
    			'permissiontable_code' => 'logs',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'project',
    			'parent_code' => 'company',
    			'name' => '项目管理',
    			'permissiontable_code' => 'project',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'consociation',
    			'parent_code' => 'company',
    			'name' => '合作管理',
    			'permissiontable_code' => 'consociation',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'department',
    			'parent_code' => 'company',
    			'name' => '部门管理',
    			'permissiontable_code' => 'department',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'position',
    			'parent_code' => 'company',
    			'name' => '岗位管理',
    			'permissiontable_code' => 'position',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'staff',
    			'parent_code' => 'company',
    			'name' => '人员管理',
    			'permissiontable_code' => 'staff',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'transfer',
    			'parent_code' => 'staff',
    			'name' => '人员调动',
    			'permissiontable_code' => 'transfer',
    			'permissiontable_type' => 'button',
			],[
    			'code' => 'career',
    			'parent_code' => 'staff',
    			'name' => '职业生涯',
    			'permissiontable_code' => 'career',
    			'permissiontable_type' => 'api',
			],[
    			'code' => 'attendance_report',
    			'parent_code' => 'attendance',
    			'name' => '考勤报表',
    			'permissiontable_code' => 'attendance_report',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'attendance_project_exception',
    			'parent_code' => 'attendance',
    			'name' => '项目异常报表',
    			'permissiontable_code' => 'attendance_project_exception',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'attendance_setting',
    			'parent_code' => 'attendance',
    			'name' => '考勤设置',
    			'permissiontable_code' => 'attendance_setting',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'scheduling',
    			'parent_code' => 'attendance',
    			'name' => '排班管理',
    			'permissiontable_code' => 'scheduling',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'modify_attendance_report',
    			'parent_code' => 'attendance_report',
    			'name' => '修改考勤数据',
    			'permissiontable_code' => 'scheduling',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection',
    			'parent_code' => 'security',
    			'name' => '巡检管理',
    			'permissiontable_code' => 'inspection',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'reporting',
    			'parent_code' => 'security',
    			'name' => '报岗管理',
    			'permissiontable_code' => 'reporting',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection_line',
    			'parent_code' => 'inspection',
    			'name' => '线路设置',
    			'permissiontable_code' => 'inspection_line',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection_circle',
    			'parent_code' => 'inspection',
    			'name' => '圈数设置',
    			'permissiontable_code' => 'inspection_circle',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection_point',
    			'parent_code' => 'inspection',
    			'name' => '点位设置',
    			'permissiontable_code' => 'inspection_point',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection_report',
    			'parent_code' => 'inspection',
    			'name' => '巡检报表',
    			'permissiontable_code' => 'inspection_report',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'inspection_exception',
    			'parent_code' => 'inspection',
    			'name' => '巡检异常',
    			'permissiontable_code' => 'inspection_exception',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'reporting_point',
    			'parent_code' => 'reporting',
    			'name' => '岗位点设置',
    			'permissiontable_code' => 'reporting_point',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'reporting_statistics',
    			'parent_code' => 'reporting',
    			'name' => '报岗报表',
    			'permissiontable_code' => 'reporting_statistics',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'reporting_statistics_exception',
    			'parent_code' => 'reporting_statistics',
    			'name' => '异常统计报表',
    			'permissiontable_code' => 'reporting_statistics_exception',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'conference_report',
    			'parent_code' => 'conference',
    			'name' => '会议报表',
    			'permissiontable_code' => 'conference_report',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'training_manager',
    			'parent_code' => 'training',
    			'name' => '培训管理',
    			'permissiontable_code' => 'training_manager',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'banner',
    			'parent_code' => 'culture',
    			'name' => 'Banner管理',
    			'permissiontable_code' => 'banner',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'article',
    			'parent_code' => 'culture',
    			'name' => '心灵驿站',
    			'permissiontable_code' => 'article',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'notification',
    			'parent_code' => 'culture',
    			'name' => '通知管理',
    			'permissiontable_code' => 'notification',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'finance_overview',
    			'parent_code' => 'finance',
    			'name' => '财务总览',
    			'permissiontable_code' => 'finance_overview',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'wages_pattern',
    			'parent_code' => 'wages',
    			'name' => '薪资方案',
    			'permissiontable_code' => 'wages_pattern',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'wages_report',
    			'parent_code' => 'wages',
    			'name' => '薪资报表',
    			'permissiontable_code' => 'wages_report',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'register_setting',
    			'parent_code' => 'system',
    			'name' => '注册设置',
    			'permissiontable_code' => 'register_setting',
    			'permissiontable_type' => 'menu',
			],[
    			'code' => 'infrastructure_setting',
    			'parent_code' => 'system',
    			'name' => '基础数据设置',
    			'permissiontable_code' => 'infrastructure_setting',
    			'permissiontable_type' => 'menu',
			]
		];

    	DB::table('permissions')->insert($permissions);
    }
}
